/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bsc.ejb.entity;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

/**
 *
 * @author memozac
 */
@Entity
public class MilestoneTracer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long idMilestoneTracer;

    private Double realValue;
    private Double goalValue;

    @ManyToOne
    @JoinColumn(name="idTask",nullable=false,updatable=true)
    private Milestone milestone;

    @ManyToOne
    @JoinColumn(name="idTracer",nullable=false,updatable=true)
    private Tracer tracer;

    public Double getGoalValue() {
        return goalValue;
    }

    public void setGoalValue(Double goalValue) {
        this.goalValue = goalValue;
    }

    public Double getRealValue() {
        return realValue;
    }

    public void setRealValue(Double realValue) {
        this.realValue = realValue;
    }

    public Milestone getMilestone() {
        return milestone;
    }

    public void setMilestone(Milestone milestone) {
        this.milestone = milestone;
    }

    public Tracer getTracer() {
        return tracer;
    }

    public void setTracer(Tracer tracer) {
        this.tracer = tracer;
    }
  
    public Long getIdMilestoneTracer() {
        return idMilestoneTracer;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idMilestoneTracer != null ? idMilestoneTracer.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof MilestoneTracer)) {
            return false;
        }
        MilestoneTracer other = (MilestoneTracer) object;
        if ((this.idMilestoneTracer == null && other.idMilestoneTracer != null) || (this.idMilestoneTracer != null && !this.idMilestoneTracer.equals(other.idMilestoneTracer))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bsc.ejb.entity.MilestoneTracer[id=" + idMilestoneTracer + "]";
    }

}//ends of class
